<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>管理员</title>

    <!-- Bootstrap -->
    <link href="../../css/bootstrap.min.css" rel="stylesheet">

    <!--sidebar-->
    <link href="../../css/sidebar.css" rel="stylesheet">


    <!--sweet-alert-->
    <link rel="stylesheet" type="text/css" href="../../../../public/common/lib/sweet-alert/sweet-alert.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .delete{
            margin-right: 5px;;
        }
        .add{
            font-size: 1.5em;
        }
    </style>

</head>
<body>
<div class="container-fluid">
    <div class="row">
        <!--左侧导航-->
        <div class="col-sm-3 col-md-2 sidebar"></div>

        <!--右面板-->
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 rightPanel">
            <div class="row">
                <h1 class="page-header col-md-11">自动化建议</h1>
                <span class="glyphicon glyphicon-plus   add" aria-hidden="true" role="button"   data-toggle="tooltip" data-placement="bottom" title="添加规则" onclick="document.location='new.html';"></span>
            </div>
            <div class="table-responsive">
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>规则</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>0001</td>
                        <td>safjksdlncksdncjsdka</td>
                        <td><span class="glyphicon glyphicon-minus delete" aria-hidden="true" role="button" data-toggle="tooltip" data-placement="bottom" title="删除规则" ></span>
                            <span class="glyphicon glyphicon-pencil modify" aria-hidden="true" role="button" data-toggle="tooltip" data-placement="bottom" title="修改规则" onclick="document.location='new.html';"></span>
                        </td>
                    </tr>

                    </tbody>
                </table>
            </div>
        </div>

    </div>
</div>


<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../../js/bootstrap.min.js"></script>

<script src="../../../../public/common/lib/sweet-alert/sweet-alert.js"></script>

<script>
    $(document).ready(function(){
        $(".sidebar").load("../sidebar.html");
        $('.delete').on('click', function(){
            swal({    title: "",    text: "你确定要删除这一规则吗？",
                        allowOutsideClick:true,   showCancelButton: true,
                        confirmButtonColor: "#DD6B55",    confirmButtonText: "确认",
                        cancelButtonText: "取消",    closeOnConfirm: false  },
                    function(){   swal({    title: "", text:"删除成功！",   confirmButtonText:"",   timer: 800  });  });
        });
    });

    //tooltip
    $(function () { $("[data-toggle='tooltip']").tooltip(); });
</script>

</body>
</html>